<%@page import="java.util.List"%>
<%@page import="com.jfinal.plugin.activerecord.Page"%>
<%@page import="com.hongye.app.model.UserAppModel"%>
<%@page import="com.hongye.app.model.BuyerStatisticsModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false"
    pageEncoding="UTF-8"%>
 <% BuyerStatisticsModel uam = (BuyerStatisticsModel)request.getAttribute("shopdetail"); %>
<!doctype html>
<html class="fixed">
	<head>
		<!-- Basic -->
		<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="keywords" content="HTML5 Admin Template" />
		<meta name="description" content="Porto Admin - Responsive HTML5 Template">
		<meta name="author" content="okler.net">
		<!-- Mobile Metas -->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<!-- Vendor CSS -->
		<link rel="stylesheet" href="../admin/css/bootstrap.css" />
		<link rel="stylesheet" href="../admin/css/font-awesome/css/font-awesome.css" />
        <link rel="stylesheet" href="../admin/css/select2.css" />
		<!-- Theme CSS -->
		<link rel="stylesheet" href="../admin/css/theme.css" />
		<!-- Skin CSS -->
		<link rel="stylesheet" href="../admin/css/default.css" />
		<!-- Theme Custom CSS -->
		<!-- Theme Custom ../admin/css -->
		<script src="../admin/js/modernizr.js"></script>
	</head>
	<body>
		<section role="main" class="content-body" style="margin-top: 50px;">
			<!-- start: page --> 
			<section class="panel">
				<header class="panel-heading"> 
					<h2 class="panel-title">店铺-详情</h2>
				</header>
				<div class="panel-body">
					<div class="panel-body">
						<p class="lead"> <span class="alternative-font">店铺详情</span> </p>
						<p>店铺状态：<%int state=uam.getInt("isshop"); 
								if(state==0){out.println("未开通");}
								else if(state==1){out.println("正常开通");} 
								else if(state==2){out.println("被冻结");}%></p>
						<p>用户电话：<%=uam.get("buyer_phone") %></p>
						<p>店铺名称：<%=uam.get("shop_name") %></p>
						<p>店铺所在城市：<%=uam.get("shop_address") %></p>
						<p>店铺说明：<%=uam.get("shop_explain") %></p>
						<p>	修改状态：
							<input type="radio" name="state" value="1" checked="<%int state_1=uam.getInt("isshop"); if(state_1 == 1){out.println("true");} %>" />解冻
							<input type="radio" name="state" value="2" checked="<%int state_2=uam.getInt("isshop"); if(state_2 == 2){out.println("true");} %>" />冻结
						</p>
						<div class="text-center">
						<a class="btn btn-facebook mb-md ml-xs mr-xs" onclick="changeState()">确定提交 </a>
                        <a class="btn btn-facebook mb-md ml-xs mr-xs" href="../admin/userView" >取消</a>
					</div>
				</div>
			</section>
<!-- Specific Page Vendor -->
<!-- Vendor -->
<script src="../admin/js/jquery.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="../admin/js/theme.js"></script>
<!-- Theme Custom -->
<script src="../admin/js/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="../admin/js/theme.init.js"></script>
<!-- Examples -->
<script src="../admin/js/tables/examples.datatables.default.js"></script>
<script src="../admin/js/tables/examples.datatables.row.with.details.js"></script>
<script src="../admin/js/tables/examples.datatables.tabletools.js"></script>
<script type="text/javascript">
function changeState(){
	var id = ${phone};
	var state = $('input[name="state"]:checked').val();
	$.get('../admin/changeShopState?state='+state+'&phone='+phone,function(data){
		if(data=='suc'){
			location.href='../admin/userView';
		}else{
			alert('提交失败!');
		}
	});
}
</script>
</body>

</html>